<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>手机秘钥添加 私宠订制账号删除</title>
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> 
	<meta name="format-detection" content="telephone=no">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.3.min.js"></script>
</head>
<body>
<style>
	input{width: 200px; float: left;}
	.tel,.password{margin-top: 50px;}

</style>
	<div class="tel">
		<input type="input" value=""/> <button>添加手机号码</button>
	</div>
	<div class="password">
		<input type="input" value=""/> <button>删除私宠订制</button>
	</div>

	<script type="text/javascript">
		$('.tel button').click(function(){
			var tel=$('.tel input').val();
			$.post("{:U('Index/deleteinfo')}",{tel:tel},function(data){
                if(data==100){
                    alert('添加成功!');
                }else if(data==101){
                	alert('添加失败!');
                }else{
                	alert('此手机号码已经存在!,不用重复添加');
                }
			})
		})
		$('.password button').click(function(){
			var password=$('.password input').val();
			$.post("{:U('Index/deleteinfo')}",{num:password},function(data){
              if(data==100){
                  alert('删除成功');
              }else{
              	  alert('删除失败');
              }
			})
		})
	</script>
</body>
</html>